import { Component, OnInit,ViewChild } from '@angular/core';
import { HomePageTableComponent } from './home-page-table/home-page-table.component';
import { home } from '../home.data';
declare var $:any;
@Component({
  selector: 'app-home-page',
  templateUrl: './home-page.component.html',
})
export class HomePageComponent implements OnInit {

  constructor() { }

  @ViewChild("table") table : HomePageTableComponent;

  ngOnInit() {
  }

  /**
   * 分页
   * @param pagination 
   */ 
  _pagination(pagination: Array<any>) {
    home.pagination.pageNo = pagination[0].pageNumber;
    home.pagination.pageSize   = pagination[0].pageSize;
    home.pagination.naturalNum = (home.pagination.pageNo - 1) * home.pagination.pageSize;
    this.table._homeTabList();
  }

}
